<template>
  <div class="son">
    我是后代{{car.name}}{{car.pice}}
    <button @click="car.pice++">
      +
    </button>
  </div>
</template>

<script>
import {inject} from 'vue'
export default {
  setup () {
    let car=inject('car')

    return {
      car
    }
  }
}
</script>

<style lang="less" scoped>
</style>